<?php
	require_once(dirname(__FILE__).'/include/config.inc.php');
	
	if ($type == "" || $parent_id == ""){  
    	exit(json_encode(array("flag" => false, "msg" => "查询类型错误")));  
	}else{    
	    // 链接数据库    
	    $sql = "SELECT region_id,region_name FROM `#@__region` WHERE  region_type=".$type.' AND parent_id='.$parent_id;
	} 

	$dosql->Execute($sql);

	$i = 0;

	while($row = $dosql->getArray()){
		
		$res[$i]['region_id'] 		= $row['region_id'];
		$res[$i]['region_name'] 	= $row['region_name'];

		$i++;
	}

	echo json_encode($res);
?>